<?php
echo $flashChart->begin();		
$flashChart->setTitle('Thống kê tỷ lệ mượn sách','{color:#000DFD;font-size:35px;padding-bottom:20px;}');
	
		$flashChart->setData($result); 
        
		$flashChart->setNumbersPath( '{n}.0.soluong' );
		$flashChart->setLabelsPath( 'default.{n}.Linhvuc.tenlv' );
		
		$colors = array();
		foreach ($result as $value)
		{
			// color function de trong controller Giaodichmuontra
			$col='#'.color();
			 while (in_array($col,$colors))
			{
				$col='#'.color();
			} 
			$colors[] =$col;
		}
		echo $flashChart->chart('pie',array('colours'=>$colors));
	    echo $flashChart->render(1000,500);
		             
?>